package cn.wk.client;

import cn.wk.domain.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

//调用服务名字
@FeignClient(value = "SPRINGCLOUD-PORVIDER",fallbackFactory = UserClientFactory.class)
@RequestMapping("/provider")
public interface UserClient {
    @GetMapping("/user/{id}")
    User getUser(@PathVariable("id")Long id);
}